import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// menu 模块
const menuRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		path: "/APIUp",
		permissions: ["APIUpListView"],
		meta: {
			title: "赋能平台",
			icon: "ApiOutlined",
			sort: 10,
		},
		children: [
			{
				path: "/APIUp/menu1",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu1/index"))),
				meta: {
					requiresAuth: true,
					icon: "ApiOutlined",
					title: "API上架",
					key: "APIUpListView"
				}
			},
			{
				path: "/APIUp/menu2",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu21/index"))),
				meta: {
					requiresAuth: true,
					icon: "ApiOutlined",
					title: "货源配置",
					key: "APIUpListView"
				}
			},
			{
				path: "/APIUp/menu3",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu221/index"))),
				meta: {
					requiresAuth: true,
					icon: "ApiOutlined",
					title: "号库提号",
					key: "APIUpListView"
				}
			},
		]
	}
];

export default menuRouter;
